package com.carl.component;

import com.carl.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class MessageComponent {

    private MessageService messageService ;

    @Autowired
    public MessageComponent(MessageService service){
        this.messageService = service;
    }

    public void printMessage(){
        System.out.println("@@ messageComponent : " + this.messageService.getMessage());
    }

}
